/*
 * Copyright (C) 2015-2019 Alibaba Group Holding Limited
 */

#ifndef __HAL_GPIO__H
#define __HAL_GPIO__H

#include <stdint.h>
#include "aos/hal/gpio.h"
#include "aos/kernel.h"
#include "fsl_gpio.h"


typedef struct {
    void      *base;
    uint8_t    pin;
} drv_manufacturer_t;

typedef struct{
    uint8_t            port;   /* Logical Port */
    drv_manufacturer_t drv;
    gpio_dev_t        *hal_dev;
} gpio_mapping_t;

typedef union {
    struct
    {
        gpio_pinstate_t def; /* only used for output, default level */
    } output_attr;
    struct
    {
        char           *reserved;
    } input_attr;
} gpio_private_t;

#ifdef __cplusplus
 extern "C" {
#endif

//void user_gpio_in_user_call(void *base, uint8_t start_pin);


#ifdef __cplusplus
}
#endif

#endif /* __HAL_GPIO__H */
